/* Layout */
import Layout from '@neu/biz-core/layout'
import ParentView from '@neu/biz-core/components/ParentView'

export default [
  {
    path: '/assets',
    name: 'hn_assets',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '资产管理',
      icon: 'fixed',
      module: 'dcam',
      code: 'menu_assets'
    },
    component: Layout,
    children: [
      {
        path: 'assetfuwutai',
        component: () => import('@neu/dcom-ui/views/workbench'),
        name: 'hn_assetfuwutai',
        meta: { title: '工作台', icon: 'right-arrow', code: 'menu_assetfuwutai', affix: true }
      },
      {
        path: 'fixedAsset',
        name: 'hn_fixedAsset',
        meta: {
          title: '资产维护',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_assets_fixedAsset'
        },
        component: () => import('@neu/dcam-ui/views/fixedAsset')
      },
      {
        path: 'contract',
        name: 'dcam_contract',
        meta: {
          title: '合同管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_contract'
        },
        component: () => import('@neu/dcam-ui/views/contract')
      },
      {
        path: 'assetLifeCycle',
        name: 'hn_assetLifeCycle',
        meta: {
          title: '全生命周期管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_assets_assetLifeCycle'
        },
        component: () => import('@neu/dcam-ui/views/assetLifeCycle')
      },
      {
        path: '/spare',
        name: 'hn_dcam_spare',
        redirect: 'noRedirect',
        alwaysShow: true,
        meta: {
          title: '闲置资产管理及利用',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_spare'
        },
        component: ParentView,
        children: [
          {
            path: 'spareType',
            name: 'hn_spareType',
            meta: {
              title: '备品备件分类',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'menu_spare_spareType'
            },
            component: () => import('@neu/dcam-ui/views/spareType')
          },
          {
            path: 'storehouse',
            name: 'hn_storehouse',
            meta: {
              title: '备品备件仓库',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'menu_spare_storehouse'
            },
            component: () => import('@neu/dcam-ui/views/storehouse')
          },
          {
            path: 'contract',
            name: 'hn_contract',
            meta: {
              title: '备品备件合同',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'menu_spare_contract'
            },

            component: () => import('@neu/dcam-ui/views/contract')
          },
          {
            path: 'stock',
            name: 'hn_stock',
            meta: {
              title: '备品备件库存',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'menu_spare_stock'
            },
            component: () => import('@neu/dcam-ui/views/stock')
          },
          {
            path: 'usespare',
            name: 'hn_usespare',
            meta: {
              title: '备品备件领用',
              icon: 'right-arrow',
              module: 'dcam',
              workOrderType: 'spareConsume',
              workOrderRequest: 'me',
              code: 'menu_operations_usespare'
            },
            component: () => import('@neu/dcam-ui/views/workOrder')
          }
        ]
      },
      {
        path: 'assetAudit',
        name: 'dcam_assetAudit',
        meta: {
          title: '资产审计',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_assets_assetAudit'
        },
        component: () => import('@neu/dcam-ui/views/assetStats')
      },
      {
        path: 'assetType',
        name: 'dcam_assetType',
        meta: {
          title: '资产分类维护',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_assets_assetType'
        },
        component: () => import('@neu/dcam-ui/views/assetType')
      },
      {
        path: 'auditlog',
        name: 'hn_auditlog',
        meta: {
          title: '资产操作日志',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'menu_assets_auditlog'
        },
        component: () => import('@neu/dcam-ui/views/auditLog')
      }
    ]
  }
]
